1. Field of the Invention
The present invention relates to a recording apparatus utilizing a flash memory and a control method of the recording apparatus.
2. Description of the Related Art
Conventionally, video cameras that record moving images and audio to recording media are known. More recently, video cameras that record moving images and audio to a large capacity flash memory or a memory card incorporating a flash memory have appeared.
A flash memory writes and reads out data in units called blocks. There are cases, however, in which a defect block in which data cannot be written normally may occur during the manufacturing process or due to a later cause. To address this, a part of the memory is prepared for use as alternative blocks for such a defect block, and data that is supposed to be recorded to the defect block is written to an alternative block (see, for example, Japanese Patent Laid-Open No. 2008-046923).
However, even when a part of the flash memory is prepared for use as alternative blocks as described above, if a defect block occurs after the alternative blocks have been used up, normal data writing is not possible, causing a writing error. In particular, when such a situation occurs during the writing of file system information to close a file, the file cannot be closed, and there is a possibility that not only this file but also all files recorded in the memory up to that point may not be able to be read out.
When data is recorded to a flash memory, the recorded data is generally managed in accordance with a predetermined file system such as FAT(File Allocation Table). Accordingly, if the alternative blocks are used up during recording of moving images with a video camera, when a defect block is found during recording of file system information for managing the recorded file, rewriting of the file system information is not possible. Furthermore, if the alternative blocks are used up during an update of the file system, the file system information might be corrupted, and data that has already been recorded might not be able to be read out.